﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Infrastucture.Data;

namespace Infrastucture.Factories
{
    public interface IFactory<DataType, DomainType>
    {
        DomainType CreateNew();
        DomainType Add(DomainType obj);
        DomainType Save(DomainType obj);
        DomainType Upsert(DomainType obj);
        DomainType Get(Func<DataType, bool> where);
        List<DomainType> GetList();
        List<DomainType> GetList(Func<DataType, bool> where);
    }
}
